package com.ikdong.toodle.activity;

import com.ikdong.toodle.R;
import com.ikdong.toodle.util.AccountManager;
import com.ikdong.toodle.util.Constant;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

public class NavigateActivity extends Activity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash);        
	}
	
	@Override
	public void onResume(){
		super.onResume();

		AccountManager mananger = new AccountManager(this);		
        if(mananger.getAccount()!=null){			
        	Intent intent = new Intent(this,TaskListActivity.class);
        	intent.putExtra(Constant.PARAM_LAUNCH, true);
    		startActivity(intent);
        }else{        	
        	Intent intent = new Intent(this,LoginActivity.class);
    		startActivity(intent);
        }
	}
}
